<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.ArrayList"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Phonebook</title>
</head>
<body>
	<form method="POST" action="req.htm">
		<table>
			<tr>
				<td>Type of request:
				</td>
				<td>
				<!--  
				<input type="radio" size="30" name="type" value="select"
					checked> Select <input type="radio" size="30" name="type"
					value="insert"> Insert <input type="radio" size="30"
					name="type" value="update"> Update <input type="radio"
					size="30" name="type" value="delete"> Delete
					</td>
					-->
					<input type="text" size="20" name="type">
			</tr>
			<tr>
				<td>Request:
				</td>
				<td><textarea rows="5" cols="30" name="request"></textarea></td>
			</tr>
			<tr>
				<td><input type="submit" value="Request"></td>
			</tr>
		</table>
		<%
		    Object res = request.getAttribute("result");
		    if (res != null) {
		%>
		<p>Response from database:</p>

		<%=res.toString()%>
		<%
		    }
		%>
	</form>

	<c:out value="${msg}"/>
</body>
</html>
